pong: clean main.o game.o events.o; g++ -o pong-1.1 main.o game.o events.o -lSDL -lSDL_ttf -lSDL_mixer -s -O2
test: clean main.o game.o eventstest; g++ -o pong-1.1 main.o game.o events.o -lSDL -lSDL_ttf -lSDL_mixer -s -O2
main.o: main.cpp game.h events.h; g++ -c main.cpp -o main.o -O2 -Wall
game.o: game.cpp game.h events.h; g++ -c game.cpp -o game.o -O2 -Wall
events.o: events.cpp events.h; g++ -c events.cpp -o events.o -O2 -Wall
eventstest: events.cpp events.h; g++ -c events.cpp -o events.o -DTEST -O2 -Wall

clean: ; if [ -e pong-1.1 ]; then rm pong-1.1; fi; if [ -e events.o ]; then rm *.o; fi;

install: instres link; sudo cp pong-1.1 /usr/games 
instres: ; sudo cp -r resources /usr/lib/x86_64-linux-gnu/pong/
link: ; sudo cp Pong.desktop /usr/share/applications
